package com.kakaxi.mybilibili.base;

import android.os.Bundle;

import com.kakaxi.mybilibili.utils.ActivityStackManager;
import com.kakaxi.mybilibili.utils.LogUtil;

/**
 * 拥有堆栈管理的活动
 * Created by kakaxi on 16/8/20.
 */

public abstract class StackActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        LogUtil.d("把活动添加到活动栈中");
        // 把活动添加到活动栈中
        ActivityStackManager.getInstance().pushActivity(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        LogUtil.d("把活动移除活动栈");
        // 把活动移除活动栈
        ActivityStackManager.getInstance().popActivityWithoutFinish(this);
    }

}
